﻿namespace SLClient.Extension
{
    using SLClient.CustomerControls;
    using SLClient.ServiceAPI;
    using System;
    using System.Collections.ObjectModel;
    using System.IO.IsolatedStorage;

    public class ViewDispatcher
    {
        public static ObservableCollection<BankInfo> Banks
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["Banks"] as ObservableCollection<BankInfo>);
            }
        }

        public static SiteConfig CurrentConfig
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["SiteConfig"] as SiteConfig);
            }
        }

        public static UserBank CurrentUserBank
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["CurrentUserBank"] as UserBank);
            }
        }

        public static DateTime IsExpried
        {
            get
            {
                return DateTime.Parse(IsolatedStorageSettings.ApplicationSettings["IsExpried"].ToString());
            }
        }

        public static UserInfo LoginUser
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["LoginUser"] as UserInfo);
            }
        }

        public static ObservableCollection<Announment> News
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["News"] as ObservableCollection<Announment>);
            }
        }

        public static ObservableCollection<PlayTypeInfo> PlayTypeInfos
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["PlayInfos"] as ObservableCollection<PlayTypeInfo>);
            }
        }

        public static PlayDataInfo SdData
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["sd"] as PlayDataInfo);
            }
        }

        public static PlayDataInfo SscData
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["ssc"] as PlayDataInfo);
            }
        }

        public static PlayDataInfo SsqData
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["ssq"] as PlayDataInfo);
            }
        }

        public static ObservableCollection<UserScaleInfo> UserScaleInfos
        {
            get
            {
                return (IsolatedStorageSettings.ApplicationSettings["UserScaleInfos"] as ObservableCollection<UserScaleInfo>);
            }
        }
    }
}

